<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>会员注册</title>
<script type="text/javascript" src="__PUBLIC__/Js/jquery-validation-1.14.0/lib/jquery-1.11.1.js"></script>
    <script type="text/javascript" src="__PUBLIC__/Js/jquery-validation-1.14.0/dist/jquery.validate.js"></script>
    <!-- <load href="__PUBLIC__/Js/home/jquery-1.11.3.js"/> -->
    <load href="__PUBLIC__/Js/home/common.js"/>
    <load href="__PUBLIC__/Js/home/banner.js"/>

    <load href="__PUBLIC__/Css/home/style.css"/>
</head>
<style>
    .higheVssel {
    overflow: hidden;
    height: 342px;
}
</style>
<body>
<!--引入头部文件-->
<include file="Common/login_register_header"/>
<div class="dr_banner">
    <!--通行证操作区-->
    <div class="dr_actionMain w1000">
        <div class="dr_passprt dr_passprt-h">
            <ul class="dr_formTabTitle fix">
                <li class="dr_formTableft activite">手机注册</li>
                <li class="dr_formTabright  em">邮箱注册</li>
            </ul>
            <div class="dr_form">
                <div class="dr_formTabMain" id="formTabs">
                    <!--手机end-->
                    <form  id='form' class="form_first" action="__URL__/registerAction" method="post">
                        <input name="type" value="1" type="hidden">
                        <input name="forward" value="#" type="hidden">
                        <input name="skey" value="UNvAsE74" type="hidden">
                        <input name="retype" value="1" type="hidden">
                        <div class="dr_formTabCon" style="display: block;">
                            <div class="higheVssel higheVssel_phone ">
                                <!--错误提示-->
                                <div class="errorMsg" id="prError"></div>
                                <!--错误提示-->
                                <input name="tel" id="tel" value="" class="ipTxt ico-phone" placeholder="请输入您注册的手机号码" type="text" maxlength="11">
                                <input name="password" id="password" class="ipTxt ico-pwd" placeholder="请输入长度为6-20位数的密码" type="password">
                                <input name="password2" id="password2" class="ipTxt ico-pwd" placeholder="请再次确认密码" type="password">
                                
                                <div class="fix">
                                    <input name="imgcode" value="1" type="hidden">
                                    <input name="code" id="code" value="" class="ipTxt ico-send inputCode" placeholder="请输入验证码" type="text">
                                    <a class="yxCode fr" href="javascript:void(0)" title="点击刷新验证码"><img src="__URL__/code" onclick="javascript:this.src = this.src +'?' + Math.random();"></a>
                                </div>
                                <div class="checkTerms">
                                    <input name="mobile_check" id="phoneCheck" checked="checked" type="checkbox"><label for="phoneCheck">同意Darry Ring用户</label><a href="javascript:void(0);">注册协议</a>和<a href="javascript:void(0);">隐私条款</a>
                                </div>
                            </div>
                            <div class="dr_Btns">
                                <!-- <a class="colorBtn" id="mobile_reg">立即加入DR族</a> -->
                                <input class="colorBtn" id="mobile_reg" value="立即注册" type="submit">
                            </div>
                            
                        </div>
                    </form>
                    <!--手机end-->
                    <!--邮箱注册-->
                    <form  id='form2' class="form_second" action="__URL__/registerAction" method="post">
                        <input name="type" value="2" type="hidden">
                        <input name="forward" value="#" type="hidden">
                        <input name="retype" value="1" type="hidden">
                        <div class="dr_formTabCon">
                            <div class="higheVssel">
                                <!--错误提示-->
                                <div class="errorMsg" id="erError"></div>
                                <!--错误提示-->
                                <input name="email" id="email" class="ipTxt ico-email" placeholder="请输入您的邮箱地址" type="text">
                                <input name="apassword" id="apassword" class="ipTxt ico-pwd" placeholder="请输入长度为6-20位数的密码" type="password">
                                <input name="apassword2" id="apassword2" class="ipTxt ico-pwd" placeholder="请再次确认密码" type="password">

                                <div class="fix">
                                    <input name="code" id="code"  value="" class="ipTxt ico-send inputCode" placeholder="请输入验证码" type="text">
                                    <a class="yxCode fr" href="javascript:void(0)" title="点击刷新验证码"><img src="__URL__/code" onclick="javascript:this.src = this.src +'?' + Math.random();"></a>
                                </div>
                                <div class="checkTerms">
                                    <input name="email_check" id="emailCheck" checked="checked" type="checkbox"><label for="emailCheck">同意Darry Ring用户</label><a href="javascript:void(0);">注册协议</a>和<a href="javascript:void(0);">隐私条款</a>
                                </div>
                            </div>
                            <div class="dr_Btns">
                                <input class="colorBtn" id="email_reg" value="立即注册" type="submit">
                                <!-- <a class="colorBtn" id="email_reg">立即加入DR族</a> -->
                            </div>
                            
                            
                        </div>
                    </form>
                    <!--邮箱注册end-->
                </div>
            </div>
        </div>
    </div>
    <!--通行证操作区 end-->
    <!--banner轮播图-->
    <ul class="dr_bannerul fix" id="drHomeBan">
        <li style="display: block;">
            <a href="javascript:void(0);" target="_top">
                <img src="__PUBLIC__/Images/home/login.jpg">
            </a>
        </li>
        <li style="display: none;">
            <a href="javascript:void(0);" target="_top">
                <img src="__PUBLIC__/Images/home/login2.jpg">
            </a>
        </li>
    </ul>
    <!--banner轮播图 end-->
    <!--banner轮播图底部显示样式-->
    <div class="drbanner_xdcort">
        <ul class="drbanner_xd" id="banBtns">
            <li class="drbanner_click"><span></span></li>
            <li class="nobg"><span></span></li>
        </ul>
    </div>
    <!--banner轮播图底部显示样式 end-->
</div>
<!--引入底部文件-->
<include file="Common/footer"/>
<!--输入文本jquery检测-->
<script >
$(function(){
    $('#form').validate({
      rules: {
        tel: {
          required: true,
          minlength: 11,
          // 自定义方法：校验手机号在数据库中是否存在
          // checkPhoneExist : true,
          isMobile: true,
        },

        password: {
            required: true,
            digits: true,
            minlength: 6,
        },
        password2: {
            required: true,
            digits: true,
            minlength: 6,
            equalTo: "#password",
        },
        code:{
            required:true,
            minlength:4,
        },
      },


      messages:{
        tel : {
          required : "* 请输入手机号",
          minlength : "* 确认手机不能小于11个字符",
          isMobile : "* 请正确填写您的手机号码",
        },
        password: {
            required: '* 密码不能为空',
            digits: '* 密码必须为纯数字',
            minlength: '* 密码长度不能小于6位数',
        },
        password2: {
            required: '* 密码不能为空',
            digits: '',
            minlength: '* 密码长度不能小于6位数',
            equalTo: "* 两次密码输入不一致",
        },
         code:{
            required:"",
            minlength:"",
        }
      }

    });
    jQuery.validator.addMethod("isMobile", function(value, element) {
      var length = value.length;
      var mobile = /^1[3|4|5|7|8]\d{9}$/;
      return (length == 11 && mobile.exec(value))? true:false;
    }, "请正确填写您的手机号码");


    $('#form2').validate({
      rules: {
       

        email: {
          required: true,
          email:true,

        },
        apassword: {
            required: true,
            digits: true,
            minlength: 6,
        },
        apassword2: {
            required: true,
            digits: true,
            equalTo: "#apassword",
        },
         code:{
            required:true,
            minlength:4,
        },

      },
      messages:{
        email:{
          required: '* 不能为空',
          email:'* 请输入正确邮箱',
        },
         apassword: {
            required: '* 密码不能为空',
            digits: '* 密码必须为纯数字',
            minlength: '* 密码长度不能小于6位数',
        },
        apassword2: {
            required: '* 密码不能为空',
            digits: '',
            equalTo: "* 两次密码输入不一致",
        },
         code:{
            required:"",
            minlength:"",
        },
      }

    });
  });
</script>

</body>
</html>
